{extend name="public:layout" /}

{block name="title"}
	<title>{:site('siteName')}-购买复投账户</title>
{/block}

{block name="css"}
	<link rel="stylesheet" type="text/css" href="__STATIC__/{$theme}/css/user.css">
{/block}

{block name="content"}
	<div class="layui-main">
		<div class="user-main">
			<div class="user-left">
				{include file="public:user" index="5" /}
			</div>
			<div class="user-right">
				<div class="layui-tab layui-tab-brief">
					<ul class="layui-tab-title">
						<li class="layui-this">购买复投账户</li>
					</ul>
					<div class="layui-tab-content">
						<form class="layui-form user-data" action="{:url('index/account/buyson')}">
							<div class="layui-form-item">
							    <label class="layui-form-label">当前价格</label>
							    <div class="layui-input-inline">
							    	<button class="layui-btn layui-btn-small layui-btn-radius layui-btn-danger">{$config['son_price']}元</button>
							    </div>
							    <div class="layui-form-mid layui-word-aux">每个账户分红满{$config['son_out']}自动出局</div>
							</div>
							<div class="layui-form-item">
							    <label class="layui-form-label">剩余{:config('currency')['recharge']}</label>
							    <div class="layui-input-inline">
							    	<button class="layui-btn layui-btn-small layui-btn-radius layui-btn-normal">{$U['recharge']}</button>
							    </div>
							    <div class="layui-form-mid layui-word-aux">预计可以购买{:intval($U['recharge'] / $config['son_price'])}个复投账户</div>
							</div>
							<div class="layui-form-item">
							    <label class="layui-form-label">已经购买</label>
							    <div class="layui-input-inline">
							    	<button class="layui-btn layui-btn-small layui-btn-radius layui-btn-warm">{$myNum}</button>
							    </div>
							    <div class="layui-form-mid layui-word-aux">剩余{$config['son_cap'] - $myNum}个复投账户可以购买</div>
							</div>
							<div class="layui-form-item">
							    <label class="layui-form-label">购买数量</label>
							    <div class="layui-input-inline">
							    	<input type="text" name="num" value="" lay-verify="required" class="layui-input">
							    </div>
							    <div class="layui-form-mid layui-word-aux">最多拥有{$config['son_cap']}个复投账户</div>
							</div>
							<div class="layui-form-item">
							    <label class="layui-form-label">支付密码</label>
							    <div class="layui-input-inline">
							    	<input type="password" name="pwd" value="" lay-verify="required" class="layui-input">
							    </div>
							    <div class="layui-form-mid layui-word-aux">请输入支付密码验证</div>
							</div>
							<div class="layui-form-item">
								<label class="layui-form-label"></label>
							    <div class="layui-input-inline">
							    	<input type="hidden" name="__token__" value="{$Request.token}" />
							    	<button class="layui-btn layui-btn-main" lay-submit>确定</button>
							    </div>
							</div>
						</form>
					</div>
				</div> 
			</div>
		</div>
	</div>
{/block}

{block name="script"}
	<script type="text/javascript">
		layui.use(['form', 'layer'], function(){
			var $ = layui.jquery;
    		var layer = layui.layer;
		});
	</script>
{/block}